package com.yy.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 组装树的数据
 * @Author: DLJD
 * @Date: 2023/4/10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TreeOptions {

    private String value;

    private String label;

    public TreeOptions(String value, String label) {
        this.value = value;
        this.label = label;
    }

    //如果children里面没有数据，就不参于序列化
//    @JsonInclude(value = JsonInclude.Include.NON_EMPTY)
    private List<TreeOptions> children=new ArrayList<>();

}